package com.vtmer.entity;

import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author Colin_Knight
 * @create 2022/10/8 17:27
 */
@Data
@NoArgsConstructor
public class IntervStatus {

    @Data
    private static class StudIntervStatus{
        private String studId;

        private Integer status;

        private Integer fail;

        private String direction;

        public StudIntervStatus(Progress progress) {
            this.status = progress.getState();
            this.studId = progress.getStudId();
            this.fail = progress.getFail();
        }

        public StudIntervStatus(RegistrationForm registrationForm){
            this.status = registrationForm.getState();
            this.studId = registrationForm.getStudId();
            this.fail = registrationForm.getFail();
            this.direction = registrationForm.getInterestGroups();
        }

        public StudIntervStatus(String studId, Integer status,Integer fail) {
            this.studId = studId;
            this.status = status;
            this.fail = fail;
        }
    }

    private StudIntervStatus change;

    public IntervStatus(Progress progress){
        this.change = new StudIntervStatus(progress);
    }

    public IntervStatus(RegistrationForm registrationForm){
        this.change = new StudIntervStatus(registrationForm);
    }

}
